unit uSBDUnit_Types;
interface
uses Windows, Classes, Messages;

type

TTernary = (TernaryFalse, TernaryTrue, TernaryOmega);

TExecutionResult = (
  erNull,     // Initial, Cleared, never run or test done but user-aborted.
  erPass,     // Test passed.
  erFail);    // Test failed.


TTestStatus = (     // Chronological status of the test.
  sReady,           // Initial state
  sSettingUp,       // Executing the test setup
  sTesting,         // Executing the test
  sTearingDown,     // Executing the test teardown
  sUserAborted,     // Aborted by user or by programmitic UserAbort
  sDone,            // Test all done
  sSkipped);        // Won't be done due to either disabled or prior failure.

TNodeKind = (
  nkNull,       // Do no display
  nkTestCase,   // An individual test case. Possibly repeated.
  nkTestSuite,  // A group of test cases shareing the same setup/teardown.
  nkTestGroup,  // Arbitary collection of test suites and test groups.
  nkRoot);      // The root node. Probably shouldn't display.


TNonFailMessageKind = (
  mkInfo,        // Informational message.
  mkWarning);    // Suspicious condition or failure of the test code
                 //  but not of the subject code.

TChangeableNodeProperty = ( propExecResult, propEnabled, propStatus, propTimes,
                            propFailCount, propExecCount, propLoadCount);
TChangeableNodePropertySet = set of TChangeableNodeProperty;

TEngineProp = (propIsRunning, propOptions, propStarted, propShutdown);
TEnginePropSet = set of TEngineProp;

IControllerFeedback = interface
  ['{BB370275-D12A-4062-99FF-5AD5CED4D774}']
    function DoUserAbort: boolean;
  end;

TMessageHandler = procedure (var Message: TMessage) of object;
IMainThreadedWindowedClient = interface
  ['{E2C98844-32CE-4CB2-97E2-E5D30955B4CF}']
    function  MainWindowHandle: HWND;
    procedure GetUnitTestMessageNum( var MessageNum: cardinal);
    procedure SetUnitTestHandler  ( UnitTest: TMessageHandler; MessageNum: cardinal; Cookie: TObject); // Hook message WM_UnitTest
    procedure ClearUnitTestHandler( Cookie: TObject);
    procedure SetTimer( OnMaturation: TNotifyEvent; Period_ms: integer; Cookie: TObject);
    procedure ClearTimer( Cookie: TObject);
    procedure Breathe;
    function  WndProc( var Message: TMessage): boolean;
  end;



implementation

end.
